From: Glenn Morris Date: Fri, 24 Aug 2007 03:09:33 +0000 (+0000) Subject: Ulrich Mueller (tiny change) X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~534^2~3^2~1726 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=17c68eb7132b464ec3a9959da198b3e1038a3018;p=emacs.git Ulrich Mueller (tiny change) (backup-buffer-copy): Don't wrap delete in condition-case, only try to delete if file exists. --- diff --git a/lisp/files.el b/lisp/files.el index dab90097119..84aa78b4a52 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3131,9 +3131,8 @@ BACKUPNAME is the backup file name, which is the old file renamed." (set-default-file-modes ?\700) (while (condition-case () (progn - (condition-case nil - (delete-file to-name) - (file-error nil)) + (and (file-exists-p to-name) + (delete-file to-name)) (copy-file from-name to-name nil t) nil) (file-already-exists t))